import com.headwire.kw.helpers.*;
import java.util.*;
import java.io.*;
import javax.xml.parsers.*;

public class ThrowawayMain {
	public static void main(String[] args) {
		try {
			articleRemover();
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	private static void lineTransformer() {
		String in = "bet-import-paths.txt";
		String out = "bet-import-paths-out2.txt";
		FileLineTransformer flt = new FileLineTransformer(in,out);
		flt.doTransform();
	}
	
	private static void fileLister() {
		FileLister f = new FileLister("C:\\data\\work-helios\\tiledkonakart\\WebContent\\jsp");
		//f.setPrefix("WEB-INF/lib/");
		//f.setDelimiter(",\n ");
		//f.setExtension("jar");
		f.run();
	}
	
	private static void articleRemover() throws Exception {
		HashMap<String,String> urls = new HashMap<String,String>();
		//urls.put("http://www.bet.com/entertainment/DVD/holidaydvdguide.htm", "");
		urls.put("http://www.bet.com/entertainment/DVD/raisininthesunflipbook.htm", "");
		urls.put("http://www.bet.com/entertainment/DVD/EntertainmentDVDFlipBlackPresidentsonFilm.htm", "");
		
		String XML_FILE_NAME = "fb-entertainment-DVD.xml";
        ExistingArticleRemover remover = new ExistingArticleRemover(urls);
		
		SAXParserFactory factory = SAXParserFactory.newInstance();
		
		//out = new OutputStreamWriter (System.out, "UTF8");
        SAXParser saxParser = factory.newSAXParser();
        saxParser.parse( new File(XML_FILE_NAME), remover);
        
        remover.removeArticles();
        remover.printXml("outfile.xml");
	}
}
